import gradio as gr

with gr.Blocks() as demo:
    ls = gr.State(0)
    button = gr.Button("Add")
    @gr.render(inputs=[ls], triggers=[button.click])
    def add_button(ls):
        if ls == 0:
            ls += 1
            gr.Markdown("## title")

        else:
            boxes = []
            ls += 1
            for i in range(ls+1):
                with gr.Row():
                    gr.Label(str(i))
                    gr.Text()
                    gr.Button("Delete")
                boxes.append()


demo.launch()